﻿<navigation:Page x:Class="SMS.Views.User.UploadImage" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                 mc:Ignorable="d"
                 xmlns:my="clr-namespace:SMS.Controls;assembly=SMS.Controls"
                 xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="Upload Image">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="auto" />
            </Grid.RowDefinitions>
            <Image HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5"
                   Source="{Binding Image, Mode=TwoWay}"></Image>
            <Button Content="upload your profile picture " Grid.Row="1" 
                    Command="{Binding ImageUpload}" HorizontalAlignment="Left"
                    Margin="5"></Button>
        </Grid>        
        <my:ErrorControl HorizontalAlignment="Left"
                         Name="errorControl1" Grid.Row="1"
                         VerticalAlignment="Top" />
    </Grid>
</navigation:Page>
